from infirmary_admin_src.infirmary_common.infirmary_controller import IBaseController
from infirmary_admin_src.infirmary_common.infirmary_controller.rest_controller_with_depends import \
    RestControllerWithDepends
from fastapi import Request, Depends, Path, Body

from infirmary_admin_src.infirmary_smart_admin.infirmary_biz.infirmary.businesses.schemas import SchemaBase


class XParam(SchemaBase):
    '''
    账号密码登录参数
    '''
    pass


class IController(IBaseController):
    '''
    定制相关约束检测函数逻辑步序
    '''

    def __init__(self, *, request: Request,
                 schema_param: XParam = Depends(),
                 ):
        super().__init__(request=request)
        # 入参参数
        # 入参参数
        self.schema_param = schema_param


@RestControllerWithDepends()
class SystemDataScopeListController(IController):

    def business_login(self):
        pass
        return [
            {"dataScopeType": 1, "dataScopeTypeName": "系统通知", "dataScopeTypeDesc": "系统通知数据范围",
             "dataScopeTypeSort": 20, "viewTypeList": [{"viewType": 0, "viewTypeName": "本人", "viewTypeLevel": 0},
                                                       {"viewType": 1, "viewTypeName": "本部门", "viewTypeLevel": 5},
                                                       {"viewType": 2, "viewTypeName": "本部门及下属子部门",
                                                        "viewTypeLevel": 10}, {"viewType": 10, "viewTypeName": "全部",
                                                                               "viewTypeLevel": 100}]}]
